Remove legacy outbound trackback action - #163
Conversation
| import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
| import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
|
||
| class EntryTrackbackRemovalTest { |
There was a problem hiding this comment.
nitpick: regression tests for code removal are probably not super useful, no? (i know LLMs love to generate tests for everything)
There was a problem hiding this comment.
Reviewed with the same multi-agent find-and-verify pass we've been using on the ROL-2183 stack. No runtime defects: the action, the allowed-method, and the JSP remnant are all gone and nothing reaches the removed path. Two leftovers outside the diff worth sweeping in a follow-up or here:
docs/roller-user-guide.adocstill has the "Sending trackbacks" section (around lines 788-811) telling users to scroll down and click Send Trackback.- The trackback i18n keys (
error.trackback,weblogEdit.trackback,weblogEdit.sendTrackback,weblogEdit.trackbackUrland the success/failure/error variants) survive inApplicationResources.propertiesand the de, es, fr, ja, ko, ru, and zh_CN bundles, plus the div.trackbackUrlrule inthemes/base.css. Nothing renders them anymore.
One small inline note on the regression test. Approving.
| NodeList allowedMethods = action.getElementsByTagName("allowed-methods"); | ||
| assertEquals(1, allowedMethods.getLength()); | ||
| String methods = allowedMethods.item(0).getTextContent(); | ||
| assertFalse(Set.of(methods.trim().split("\\s*,\\s*")).contains("trackback")); |
There was a problem hiding this comment.
Tiny one: Set.of throws IllegalArgumentException on duplicate elements, so a duplicated method name in allowed-methods would fail this test with "duplicate element" instead of an assertion about trackback. List.of(...).contains(...) does the same job without that trap.
Summary
now-unreferenced configuration property that went with it.
current methods.
Rationale
The editor stopped presenting outbound trackback controls some time ago, but
the action and its supporting code remained in the application with nothing
reaching them. This removes that dormant path. Incoming trackback handling is
unchanged.
User impact
Manual outbound trackback sending from the entry editor is no longer
available. Entry creation, entry editing, and incoming trackbacks otherwise
behave as before.
Validation
mvn -pl app clean verify -Dnet.bytebuddy.experimental=true— 160 tests,0 failures, 1 skipped.